import type { ReactElement } from 'react';
import { MinusIcon, WrenchIcon } from '@patternfly/react-icons';

import IconText from './IconText';

export type VulnerabilityFixableIconTextProps = {
    isFixable: boolean;
    isTextOnly?: boolean;
};

function VulnerabilityFixableIconText({
    isFixable,
    isTextOnly,
}: VulnerabilityFixableIconTextProps): ReactElement {
    const icon = isFixable ? <WrenchIcon /> : <MinusIcon />;
    const text = isFixable ? 'Fixable' : 'Not fixable';

    return <IconText icon={icon} text={text} isTextOnly={isTextOnly} />;
}

export default VulnerabilityFixableIconText;
